package com.macro.mall.tiny.modules.basic.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author Tyrone
 * @date 2024/11/17 14:06
 */
@Data
public class OrderIncreaseData {
    @ApiModelProperty("范围内订单日均数量 item结构： {days: 日期, count: 日均数量}")
    List<OrderIncreaseItem> dailyOrderIncrease;

    @ApiModelProperty("当月订单数量")
    Integer currentMonthlyOrderNum = 0;

    @ApiModelProperty("上月订单数量")
    Integer lastMonthlyOrderNum = 0;

    @ApiModelProperty("当月订单收入金额")
    Integer currentMonthlyOrderIncome = 0;

    @ApiModelProperty("上月订单收入金额")
    Integer lastMonthlyOrderIncome = 0;

    @ApiModelProperty("本周订单数量")
    Integer currentWeekOrderNum = 0;

    @ApiModelProperty("上周订单数量")
    Integer lastWeekOrderNum = 0;

    @ApiModelProperty("本周订单收入金额")
    Integer currentWeekIncome = 0;

    @ApiModelProperty("上周订单收入金额")
    Integer lastWeekIncome = 0;

    @ApiModelProperty("今日订单数量")
    Integer todayOrderNum = 0;

    @ApiModelProperty("今日订单收入金额")
    Integer todayOrderIncome = 0;

    @ApiModelProperty("昨日订单数量")
    Integer yesterdayOrderNum = 0;

    @ApiModelProperty("昨日订单收入金额")
    Integer yesterdayOrderIncome = 0;

    @Data
    public static class OrderIncreaseItem {

        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        Date date;

        Integer orderCount = 0;

        Integer orderAmount = 0;

    }
}
